package com.seveneight.baijiesteward.ui.user.presenter;

import android.content.Context;

import com.seveneight.baijiesteward.bean.AnyBean;
import com.seveneight.baijiesteward.http.MyCallBack;
import com.seveneight.baijiesteward.ui.user.contract.RemoveCardContract;
import com.seveneight.baijiesteward.ui.user.model.RemoveCardModel;

import okhttp3.RequestBody;

/**
 * Created by user1 on 2018/3/26.
 */

public class RemoveCardPresenter implements RemoveCardContract.RemoveCardPresenter {

    RemoveCardContract.RemoveCarView removeCarView;
    RemoveCardContract.RemoveCardModel removeCardModel;

    public RemoveCardPresenter(RemoveCardContract.RemoveCarView removeCarView){
        this.removeCarView=removeCarView;
        removeCardModel=new RemoveCardModel();
    }

    @Override
    public void removeCard(Context context, RequestBody body) {
        removeCardModel.removeCard(context,body, new MyCallBack<AnyBean>() {
            @Override
            public void onSuccess(AnyBean anyBean) {
                removeCarView.reBackRemoveStatus();
            }

            @Override
            public void onFailed() {

            }
        });
    }
}
